<div id="network-supply-reliability-bar1" style="height: 100%">

</div>

<script type="text/javascript">
    function loadbar1(d,types) {
        if (d.data) {
            var myChart = echarts.init(document.getElementById('network-supply-reliability-bar1'), types);
            var option = {
                title: {
                    text: '一级中心成本',
                    subtext: '单位（元）',
                    show: true
                },
                tooltip: {
                    trigger: 'axis',
                    axisPointer : {            // 坐标轴指示器，坐标轴触发有效
                        type : 'shadow'        // 默认为直线，可选为：'line' | 'shadow'
                    }
                },
                legend: {
                       data: ['仓库租金','人员成本','设备成本','能耗成本']
                },
                grid: {
//                    left: '3%',
//                    right: '4%',
//                    bottom: '3%',
//                    top:'8%',
//                    containLabel: true
                },
                toolbox: {

                },
                xAxis:
                    {
                        type: 'category',
                        data: d.data.arr1,
                        axisLabel:{
                            show:true,
                            textStyle:{
                                color:"#595959"
                            }
                        },
                        axisLine: {
                            show: false
                        },
                        axisTick: {
                            show: false
                        },
                    }
                ,
                yAxis: [
                    {
                        type: 'value',
                        axisLine: {
                            show: false
                        },
                        axisTick: {
                            show: false
                        },
                        axisLabel: {
                            formatter: function(value){
                                var var1=value*1;
                                return var1;
                            },
                            textStyle:{
                                color:"#595959"
                            }
                        },
                        splitLine:{
                            show:true
                        },
                        splitArea: {
                            show: true,
                            areaStyle: {
                                color: ['rgba(0,0,0,0)', 'rgba(0,0,0,0)']
                            }
                        },
                    }
                ],
                series: [
                    {
                        name: '仓库租金',
                        type: 'line',
                        data: d.data.arr2,
                        barMaxWidth:30,
                        stack:'人均配送工作时间',
                    },
                    {
                        name: '人员成本',
                        type: 'line',
                        data: d.data.arr21,
                        barMaxWidth:30,
                        stack:'人均配送工作时间',
                    },
                    {
                        name: '设备成本',
                        type: 'line',
                        data: d.data.arr22,
                        barMaxWidth:30,
                        stack:'人均配送工作时间',
                    },
                    {
                        name: '能耗成本',
                        type: 'line',
                        data: d.data.arr23,
                        barMaxWidth:30,
                        stack:'人均配送工作时间',
                    },
                ]
            };
            myChart.setOption(option);
        }else{
            var div1="<div type='text' style='padding-top:15%' class=' text-center '>"+d.message+"</div>";
            $("#network-supply-costing-bar1").empty();
            $("#network-supply-costing-bar1").prepend(div1);
        }
    }

</script>